//!输入和输出
use std::io;
use std::io::Write;
use std::io::Error;

//输入
pub fn read_from_stdin(){
    let mut s = String::new();
    //最后一个\n也会读入
    let r = io::stdin().read_line(&mut s);
    println!("{}, size:{}", s, r.unwrap());
}
//输出
pub fn write_to_stdout()->Result<usize, Error>{
    let r = io::stdout().write("hello中国".as_bytes())?;
    println!("\nsize:{}",  r);
    Ok(r)
}